import { Router } from 'express'
import { AuthController } from '../controllers/auth.controller'
import { authMiddleware } from '../middleware/auth'

const router = Router()
const authController = new AuthController()

// 公开路由
router.post('/login', authController.login.bind(authController))
router.post('/register', authController.register.bind(authController))

// 需要认证的路由
router.get('/profile', authMiddleware, authController.getProfile.bind(authController))

export default router 